import React from 'react';
import Cnav from '../../cnav/Cnav';

class ClubBanner extends React.Component {
    constructor(props) {
        super(props);
        this.displayName = 'ClubBanner';
        this.state = {
            data: props.data
        }
    }

    componentWillReceiveProps(nextProps) {
        this.setState({
            data: nextProps.data
        });
    }

    render() {
        return (
            <div className="banner clubBanner">
                <img className="logo"  src={this.state.data.imgSrc}/>
                <p>
                    {this.state.data.info}
                </p>
                <Cnav />
            </div>
        );
    }
}

export default ClubBanner;
